#ifndef HOSTRING_H
#define HOSTRING_H

#define BOOL  int
#define FALSE 0
#define TRUE  1

char* substr(char *str, int start, int length);
char* substring(char *str, int start, int end);
char* str_replace(char *str, char *search, char *replace);
BOOL string_compare(char *str1, char *str2);
char* create_string(char *str);
char* catenate_string(char *str1, char *str2);
int string_len(char *str);
BOOL has_headtail_space(char *str);
char* trim_string(char *str);
char* get_visible_string(char *str);
void* destroy_string(char *str);
char** string_sort_bylength(int array_length, char **source);
char* get_strings_head(int str_count, char **strs);

char* push_stack(char *stack, char c);
char pop_stack(char **stack);

BOOL is_letter_start(char *s);
BOOL is_underline_start(char *s);
BOOL is_sth_start(char *s, char start);

BOOL in_words_array(char **array, int array_length, char *search);
BOOL in_words_array_ex(char **array, int array_length, char *search, int index, int *len_pointer);
BOOL in_string(char *array, char search);

#endif // HOSTRING_H
